package org.veridiandynamics.server.dao;

import java.util.Date;
import java.util.List;

import org.veridiandynamics.server.domain.MyException;

public class ExceptionLogger {

	public static void Append(String message)
	{
		HibernateDriver myhdriver = new HibernateDriver();
		MyException newexception=new MyException(new Date(), message);
		myhdriver.SaveObject(newexception);
		myhdriver.CloseConnection();
	}
	
	public static List<MyException> RetrieveAll()
	{
		HibernateDriver myhdriver = new HibernateDriver();
		List<MyException> returnlist=null;
		returnlist=myhdriver.GetAll(new MyException());
		myhdriver.CloseConnection();
		return returnlist;
	}
}
